<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>anonymity Function </title>
	
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="this is my page">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    
    <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->

  </head>
  
  <body>
	<script type="text/javascript">
		// anonymity function ,常用在事件处理中
		document.body.onload = function(){			//  处理文档载入完成的事件
			alert("hello");
		}
		//  anonymity function 也可以在定义的时候赋值给一个变量
			var max = function(a,b){
				if(a>b) return a;
				return b;
			}
		//  调用匿名函数
		function test(){
			alert(max(5,2));
		}
	</script>
	<input type="button" onClick="test()" value="匿名 Function 调用测试" >
  </body>
</html>
